package com.huike.service;

import com.huike.mapper.ChargeHospitalMapper;
import com.huike.pojo.ChargeHospital;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
@Service
public class ChargeHospitalService {
    @Autowired
    private ChargeHospitalMapper chargeHospitalMapper;

    public List<ChargeHospital> getgetChargeHospitalAll( String registerName, String id) {
        if (registerName!=null&&registerName!=""){
            registerName="%"+registerName+"%";
        }else {
            registerName="%%";
        }
        if (id!=null){
            id="%"+id+"%";
        }else {
            id="%%";
        }
        return  chargeHospitalMapper.getChargeHospitalAll(registerName,id);
    }

    public void addChargeHospital(ChargeHospital chargeHospital) {
        chargeHospitalMapper.addChargeHospital(chargeHospital);
    }

    public ChargeHospital getChargeHospitalById(Integer id) {
        return chargeHospitalMapper.getChargeHospitalById(id);
    }

    public ChargeHospital getChargeHospitaladd(Integer id){
        return chargeHospitalMapper.getChargeHospitaladd(id);

    }
    public ChargeHospital getChargeHospitaladl(String chargeName){
        return chargeHospitalMapper.getChargeHospitaladl(chargeName);
    }
}
